﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Frame, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Region, "ScriptType"))

	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Frame, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Region, "Function"))

	_DB:AddCodeHelp("IsMovable", [=[Returns whether the frame can be moved by the user]=], [=[IsMovable()]=])
	_DB:AddCodeHelp("GetBoundsRect", [=[Returns the position and dimension of the smallest area enclosing the frame and its children]=], [=[GetBoundsRect()]=])
	_DB:AddCodeHelp("GetBackdropColor", [=[Returns the shading color for the frame's background graphic]=], [=[GetBackdropColor()]=])
	_DB:AddCodeHelp("RegisterForDrag", [=[Registers the frame for dragging]=], [=[RegisterForDrag(...)]=])
	_DB:AddCodeHelp("GetEffectiveScale", [=[Returns the overall scale factor of the frame]=], [=[GetEffectiveScale()]=])
	_DB:AddCodeHelp("SetMaxResize", [=[Sets the maximum size of the frame for user resizing]=], [=[SetMaxResize(maxWidth, maxHeight)]=])
	_DB:AddCodeHelp("SetFrameStrata", [=[Sets the general layering strata of the frame]=], [=[SetFrameStrata("strata")]=])
	_DB:AddCodeHelp("SetMovable", [=[Sets whether the frame can be moved by the user]=], [=[SetMovable(enable)]=])
	_DB:AddCodeHelp("GetAttribute", [=[Returns the value of a secure frame attribute]=], [=[GetAttribute("name")]=])
	_DB:AddCodeHelp("GetTitleRegion", [=[Returns the frame's TitleRegion object]=], [=[GetTitleRegion()]=])
	_DB:AddCodeHelp("SetUserPlaced", [=[Flags the frame for automatic saving and restoration of position and dimensions]=], [=[SetUserPlaced(enable)]=])
	_DB:AddCodeHelp("FireEvent", [=[Fire an Event, can only fire custom event, fire system event will do nothing]=], [=[FireEvent(event, ...)]=])
	_DB:AddCodeHelp("GetFrameStrata", [=[Returns the general layering strata of the frame]=], [=[GetFrameStrata()]=])
	_DB:AddCodeHelp("EnableKeyboard", [=[Enables or disables keyboard interactivity for the frame]=], [=[EnableKeyboard(enable)]=])
	_DB:AddCodeHelp("SetHitRectInsets", [=[Sets the insets from the frame's edges which determine its mouse-interactable area]=], [=[SetHitRectInsets(left, right, top, bottom)]=])
	_DB:AddCodeHelp("SetClampedToScreen", [=[Sets whether the frame's boundaries should be limited to those of the screen]=], [=[SetClampedToScreen(enable)]=])
	_DB:AddCodeHelp("IsResizable", [=[Returns whether the frame can be resized by the user]=], [=[IsResizable()]=])
	_DB:AddCodeHelp("StartSizing", [=[Begins resizing the frame via mouse movement]=], [=[StartSizing()]=])
	_DB:AddCodeHelp("GetHitRectInsets", [=[Returns the insets from the frame's edges which determine its mouse-interactable area]=], [=[GetHitRectInsets()]=])
	_DB:AddCodeHelp("IsSystemEvent", [=[Check whether the event is a system event]=], [=[IsSystemEvent(event)]=])
	_DB:AddCodeHelp("GetRegions", [=[Returns a list of non-Frame child regions belonging to the frame]=], [=[GetRegions()]=])
	_DB:AddCodeHelp("IgnoreDepth", [=[Sets whether the frame's depth property is ignored (for stereoscopic 3D setups)]=], [=[IgnoreDepth(enable)]=])
	_DB:AddCodeHelp("IsMouseWheelEnabled", [=[Returns whether mouse wheel interactivity is enabled for the frame]=], [=[IsMouseWheelEnabled()]=])
	_DB:AddCodeHelp("Dispose", [=[Dispose, release resource]=], [=[Dispose()]=])
	_DB:AddCodeHelp("SetID", [=[Sets a numeric identifier for the frame]=], [=[SetID(id)]=])
	_DB:AddCodeHelp("GetAnimationGroups", [=[Returns a list of animation groups belonging to the region]=], [=[GetAnimationGroups()]=])
	_DB:AddCodeHelp("GetEffectiveDepth", [=[Returns the overall 3D depth of the frame (for stereoscopic 3D configurations)]=], [=[GetEffectiveDepth()]=])
	_DB:AddCodeHelp("IsIgnoringDepth", [=[Returns whether the frame's depth property is ignored (for stereoscopic 3D setups)]=], [=[IsIgnoringDepth()]=])
	_DB:AddCodeHelp("IsClampedToScreen", [=[Returns whether the frame's boundaries are limited to those of the screen]=], [=[IsClampedToScreen()]=])
	_DB:AddCodeHelp("GetMinResize", [=[Returns the minimum size of the frame for user resizing]=], [=[GetMinResize()]=])
	_DB:AddCodeHelp("GetID", [=[Returns the frame's numeric identifier]=], [=[GetID()]=])
	_DB:AddCodeHelp("IsKeyboardEnabled", [=[Returns whether keyboard interactivity is enabled for the frame]=], [=[IsKeyboardEnabled()]=])
	_DB:AddCodeHelp("GetNumChildren", [=[Returns the number of child frames belonging to the frame]=], [=[GetNumChildren()]=])
	_DB:AddCodeHelp("EnableMouseWheel", [=[Enables or disables mouse wheel interactivity for the frame]=], [=[EnableMouseWheel(enable)]=])
	_DB:AddCodeHelp("SetBackdropBorderColor", [=[Sets a shading color for the frame's border graphic]=], [=[SetBackdropBorderColor(red, green, blue [, alpha])]=])
	_DB:AddCodeHelp("StartMoving", [=[Begins repositioning the frame via mouse movement]=], [=[StartMoving()]=])
	_DB:AddCodeHelp("Lower", [=[Reduces the frame's frame level below all other frames in its strata]=], [=[Lower()]=])
	_DB:AddCodeHelp("IsJumpNavigateStart", [=[]=], [=[]=])
	_DB:AddCodeHelp("CanChangeProtectedState", [=[Returns whether protected properties of the region can be changed by non-secure scripts]=], [=[CanChangeProtectedState()]=])
	_DB:AddCodeHelp("AllowAttributeChanges", [=[Temporarily allows insecure code to modify the frame's attributes during combat]=], [=[AllowAttributeChanges()]=])
	_DB:AddCodeHelp("EnableDrawLayer", [=[Allows display of all child objects of the frame on a specified graphics layer]=], [=[EnableDrawLayer("layer")]=])
	_DB:AddCodeHelp("EnableJoystick", [=[Enables or disables joystick interactivity]=], [=[EnableJoystick(enable)]=])
	_DB:AddCodeHelp("SetBackdrop", [=[Sets a backdrop graphic for the frame]=], [=[SetBackdrop(backdrop)]=])
	_DB:AddCodeHelp("IsJoystickEnabled", [=[Returns whether joystick interactivity is enabled for the frame]=], [=[IsJoystickEnabled()]=])
	_DB:AddCodeHelp("SetDepth", [=[Sets the 3D depth of the frame (for stereoscopic 3D configurations)]=], [=[SetDepth(depth)]=])
	_DB:AddCodeHelp("GetBackdropBorderColor", [=[Returns the shading color for the frame's border graphic]=], [=[GetBackdropBorderColor()]=])
	_DB:AddCodeHelp("GetBackdrop", [=[Returns information about the frame's backdrop graphic]=], [=[GetBackdrop()]=])
	_DB:AddCodeHelp("SetAttribute", [=[Sets a secure frame attribute]=], [=[SetAttribute("name", value)]=])
	_DB:AddCodeHelp("SetJumpNavigateEnabled", [=[]=], [=[]=])
	_DB:AddCodeHelp("IsMouseEnabled", [=[Returns whether mouse interactivity is enabled for the frame]=], [=[IsMouseEnabled()]=])
	_DB:AddCodeHelp("IsJumpNavigateEnabled", [=[]=], [=[]=])
	_DB:AddCodeHelp("SetJumpNavigateStart", [=[]=], [=[]=])
	_DB:AddCodeHelp("GetClampRectInsets", [=[Returns offsets from the frame's edges used when limiting user movement or resizing of the frame]=], [=[GetClampRectInsets()]=])
	_DB:AddCodeHelp("GetFrameType", [=[Get the type of this frame.]=], [=[GetFrameType()]=])
	_DB:AddCodeHelp("UnregisterAllEvents", [=[Unregisters the frame from any [[docs/events|events]] for which it is registered]=], [=[UnregisterAllEvents()]=])
	_DB:AddCodeHelp("RegisterEvent", [=[Registers the frame for an [[docs/events|event]]]=], [=[RegisterEvent("event")]=])
	_DB:AddCodeHelp("RegisterAllEvents", [=[Registers the frame for all events]=], [=[RegisterAllEvents()]=])
	_DB:AddCodeHelp("CreateTexture", [=[Creates a new [[docs/widgets/Texture|`Texture`]] as a child of the frame]=], [=[CreateTexture(["name" [, "layer" [, "inherits"]]])]=])
	_DB:AddCodeHelp("DisableDrawLayer", [=[Prevents display of all child objects of the frame on a specified graphics layer]=], [=[DisableDrawLayer("layer")]=])
	_DB:AddCodeHelp("EnableMouse", [=[Enables or disables mouse interactivity for the frame]=], [=[EnableMouse(enable)]=])
	_DB:AddCodeHelp("GetChildren", [=[Returns a list of child frames of the frame]=], [=[GetChildren()]=])
	_DB:AddCodeHelp("IsUserPlaced", [=[Returns whether the frame is flagged for automatic saving and restoration of position and dimensions]=], [=[IsUserPlaced()]=])
	_DB:AddCodeHelp("IsEventRegistered", [=[Returns whether the frame is registered for a given [[docs/events|event]]]=], [=[IsEventRegistered("event")]=])
	_DB:AddCodeHelp("StopMovingOrSizing", [=[Ends movement or resizing of the frame initiated with [[docs/widgets/Frame/StartMoving|`:StartMoving()`]] or [[docs/widgets/Frame/StartSizing|`:StartSizing()`]]]=], [=[StopMovingOrSizing()]=])
	_DB:AddCodeHelp("SetClampRectInsets", [=[Sets offsets from the frame's edges used when limiting user movement or resizing of the frame]=], [=[SetClampRectInsets(left, right, top, bottom)]=])
	_DB:AddCodeHelp("SetToplevel", [=[Sets whether the frame should automatically come to the front when clicked]=], [=[SetToplevel(enable)]=])
	_DB:AddCodeHelp("SetResizable", [=[Sets whether the frame can be resized by the user]=], [=[SetResizable(enable)]=])
	_DB:AddCodeHelp("GetFrameLevel", [=[Sets the level at which the frame is layered relative to others in its strata]=], [=[GetFrameLevel()]=])
	_DB:AddCodeHelp("GetEffectiveAlpha", [=[Returns the overall opacity of the frame]=], [=[GetEffectiveAlpha()]=])
	_DB:AddCodeHelp("SetScale", [=[Sets the frame's scale factor]=], [=[SetScale(scale)]=])
	_DB:AddCodeHelp("SetMinResize", [=[Sets the minimum size of the frame for user resizing]=], [=[SetMinResize(minWidth, minHeight)]=])
	_DB:AddCodeHelp("GetNumRegions", [=[Returns the number of non-Frame child regions belonging to the frame]=], [=[GetNumRegions()]=])
	_DB:AddCodeHelp("Raise", [=[Increases the frame's frame level above all other frames in its strata]=], [=[Raise()]=])
	_DB:AddCodeHelp("HookScript", [=[Securely hooks a script handler]=], [=[HookScript("scriptType", handler)]=])
	_DB:AddCodeHelp("CreateFontString", [=[Creates a new [[docs/widgets/FontString|`FontString`]] as a child of the frame]=], [=[CreateFontString(["name" [, "layer" [, "inherits"]]])]=])
	_DB:AddCodeHelp("CreateTitleRegion", [=[Creates a title region for dragging the frame]=], [=[CreateTitleRegion()]=])
	_DB:AddCodeHelp("SetBackdropColor", [=[Sets a shading color for the frame's background graphic]=], [=[SetBackdropColor(red, green, blue [, alpha])]=])
	_DB:AddCodeHelp("IsToplevel", [=[Returns whether the frame is automatically raised to the front when clicked]=], [=[IsToplevel()]=])
	_DB:AddCodeHelp("SetFrameLevel", [=[Sets the level at which the frame is layered relative to others in its strata]=], [=[SetFrameLevel(level)]=])
	_DB:AddCodeHelp("GetScale", [=[Returns the frame's scale factor]=], [=[GetScale()]=])
	_DB:AddCodeHelp("GetMaxResize", [=[Returns the maximum size of the frame for user resizing]=], [=[GetMaxResize()]=])
	_DB:AddCodeHelp("UnregisterEvent", [=[Unregisters the frame for an event]=], [=[UnregisterEvent("event")]=])
	_DB:AddCodeHelp("GetDepth", [=[Returns the 3D depth of the frame (for stereoscopic 3D setups)]=], [=[GetDepth()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Frame, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Region, "Property"))

	_DB:AddCodeHelp("BackdropColor", [[the shading color for the frame's background graphic]], IGAS:GetPropertyType("Color"))
	_DB:AddCodeHelp("Scale", [[the frame's scale factor]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("BackdropBorderColor", [[the shading color for the frame's border graphic]], IGAS:GetPropertyType("Color"))
	_DB:AddCodeHelp("Movable", [[whether the frame can be moved by the user]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("HitRectInsets", [[the insets from the frame's edges which determine its mouse-interactable area]], IGAS:GetPropertyType("RectInset"))
	_DB:AddCodeHelp("ID", [[a numeric identifier for the frame]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("KeyboardEnabled", [[whether keyboard interactivity is enabled for the frame]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("MouseEnabled", [[whether mouse interactivity is enabled for the frame]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("FrameLevel", [[the level at which the frame is layered relative to others in its strata]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("MaxResize", [[the maximum size of the frame for user resizing]], IGAS:GetPropertyType("Size"))
	_DB:AddCodeHelp("Backdrop", [[the backdrop graphic for the frame]], IGAS:GetPropertyType("Backdrop"))
	_DB:AddCodeHelp("ClampRectInsets", [[offsets from the frame's edges used when limiting user movement or resizing of the frame]], IGAS:GetPropertyType("RectInset"))
	_DB:AddCodeHelp("Toplevel", [[whether the frame should automatically come to the front when clicked]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Resizable", [[whether the frame can be resized by the user]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("MinResize", [[the minimum size of the frame for user resizing]], IGAS:GetPropertyType("Size"))
	_DB:AddCodeHelp("FrameStrata", [[the general layering strata of the frame]], IGAS:GetPropertyType("FrameStrata"))
	_DB:AddCodeHelp("Depth", [[the 3D depth of the frame (for stereoscopic 3D setups)]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("DepthIgnored", [[whether the frame's depth property is ignored (for stereoscopic 3D setups)]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("ClampedToScreen", [[whether the frame's boundaries are limited to those of the screen]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("MouseWheelEnabled", [[whether mouse wheel interactivity is enabled for the frame]], IGAS:GetPropertyType("boolean"))
end
